package com.wuzheng.wisgo.sanitation.cloud.paraandgetutil;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @Description: TODO
 * @Author sunpeng
 * @Date 2019/11/15 13:27
 **/

public class ParameterRetUtils {
    /*
     * @MethodName: getPropertiesParameter
     * @Description:  通过配置文件获取参数
     * @Param: [parameter]
     * @Return: java.lang.String
     * @Author: sunpeng
     * @Date: 2019/11/15
     **/
    public static String getPropertiesParameter(String parameter) throws IOException {
        Properties prop = new Properties();
        //读取属性文件a.properties
        InputStream in = ParameterRetUtils.class.getResourceAsStream("/parameter.properties");
        prop.load(in);     ///加载属性列表
        in.close();
        String para = prop.getProperty(parameter);
        return para;
    }
}
